<% if @request_and_complaint_registration_requests.size > 0 %>
<table class="paginated_table sorted_table">
  <thead>
  <tr>
    <th>ID</th>
    <th>Nombre</th>
    <th>Mail</th>
    <th>Descripcion</th>
    <th>Estado</th>
    <th></th>
  </tr>
</thead>
<% @request_and_complaint_registration_requests.each do |request_and_complaint_registration_request| %>
<tbody>
  <tr>
     <td><%= request_and_complaint_registration_request.id %></td>
     <td><%= request_and_complaint_registration_request.name %></td>
     <td><%= request_and_complaint_registration_request.mail %></td>
     <td><%= request_and_complaint_registration_request.description %></td>
     <td><%= request_and_complaint_registration_request.str_state %></td>
    <td>

    <%= link_to image_tag("navi/search-16-ns.png", :border => 0, :title => 'Mostrar'), {:action => 'show',:id => request_and_complaint_registration_request.id}%>
    <% if request_and_complaint_registration_request.state==0 or request_and_complaint_registration_request.state==3 %>
     <%= link_to image_tag("navi/badge-square-check-16-ns.png", :border => 0, :title => 'Aprobar'), {:action => 'aprove',:id => request_and_complaint_registration_request.id}, {:confirm => '¿Realmente desea aprobar esta Solicitud de Inscripcion?'}%>
        <%= link_to image_tag("navi/badge-square-minus-16-ns.png", :border => 0, :title => 'Rechazar'), {:action => 'reject',:id => request_and_complaint_registration_request.id}, {:confirm => '¿Realmente desea rechazar esta Solicitud de Inscripcion?'}%>
       <% if user_signed_in? && [2].include?(current_user.role) %>
        <%= link_to image_tag("navi/badge-square-check-16-ns.png", :border => 0, :title => 'Asignar'), {:action => 'assign',:id => request_and_complaint_registration_request.id, :registration_request_responsible => "replace_user_id"}, {:confirm => '¿Realmente desea asignar esta Solicitud de Inscripcion?', :class=>"asign_registration_request"}%>

      <%end%>
    <%end%>
    </td>
  </tr>
  </tbody>
<% end %>
</table>
<% else %>
  <p>Ninguna Solicitud de Inscripcion encontrada</p>
<% end %>